package com.example.demo;

import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Inject;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.annotation.Param;

@Controller
public class DemoController {
  @Inject DemoConfig demoConfig;

  @Mapping("/hello")
  public String hello(@Param(defaultValue = "world") String name) {
    System.out.println(demoConfig);
    for (DemoProp prop : demoConfig.getProps()) {
      System.out.println(prop);
    }

    return String.format("Hello %s!", name);
  }
}
